package neww;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.lang.reflect.Method;

/**
 * 一个类 如何顶五个类
 *    把五个类中内容 抽取出来
 *       合并到这个类中
 *        怎么区分他们呢
 *          这是一个类
 *            通过方法区分
 */
@WebServlet("/user")
public class UserServlet extends BaseServlet {

    //定义五个功能
    public void add(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        System.out.println("添加操作");
    }

    public void delete(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        System.out.println("删除操作");
    }

    public void update(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        System.out.println("更新操作");
    }

    public void queryAll(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        System.out.println("查询所有的用户信息操作");
    }

    public void queryById(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        System.out.println("根据id查询用户");
    }



}
